package com.jic.market.impl.rest.allocation;

import com.jic.market.common.enums.CostAllocationFlagEnum;
import com.jic.market.entity.AllocationModel;
import com.jic.market.entity.LotteryTheme;
import com.jic.market.request.after.TellAddAllocationRequest;
import com.jic.market.request.rest.allocation.CollectionThemeInfoRequest;
import com.jic.market.response.rest.allocation.QueryAllocationAndThemeInfoResponse;
import com.jic.market.service.LotteryActivityService;
import com.jic.market.service.allocation.PromotionAddAllocationStrategy;
import com.jic.market.service.rest.allocation.QueryPromotionForAllocationStrategy;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author xuyongliang
 * @version V1.0
 * @className PromotionAddAllocationStrategyLottery
 * @description 抽奖活动信息查询策略
 * @date 2020/4/10
 */
@Slf4j
@Service("queryPromotionForAllocationLottery")
public class QueryPromotionForAllocationStrategyLottery implements QueryPromotionForAllocationStrategy {

    @Resource
    private LotteryActivityService lotteryActivityService;

    @Override
    public QueryAllocationAndThemeInfoResponse collectionThemeInfo(CollectionThemeInfoRequest request) {
        log.info("--------进入抽奖活动信息查询策略request--{}-----",request);
        // 转成 long 类型
        String promotionCode = request.getPromotionCode();
//        LotteryTheme lotteryTheme = lotteryActivityService.queryByPromotionCode(promotionCode);

//        QueryAllocationAndThemeInfoResponse model =new QueryAllocationAndThemeInfoResponse();
//        model.setStartTime(lotteryTheme.getEffStartTime());
//        model.setEndTime(lotteryTheme.getEffEndTime());
//        if(lotteryTheme.getProUserType() !=null){
//            model.setProUserType(String.valueOf(lotteryTheme.getProUserType()));
//        }
//        model.setMailType();
//        return model;
        return  null;
    }
}
